home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 039a / mawk10.zip / FIELD.H < prev    next >
C/C++ Source or Header  |  1991-10-05  |  2KB  |  78 lines

  1.  
  2. /********************************************
  3. field.h
  4. copyright 1991, Michael D. Brennan
  5.  
  6. This is a source file for mawk, an implementation of
  7. the AWK programming language.
  8.  
  9. Mawk is distributed without warranty under the terms of
  10. the GNU General Public License, version 2, 1991.
  11. ********************************************/
  12.  
  13. /* $Log:    field.h,v $
  14.  * Revision 3.4.1.1  91/09/14  17:23:15  brennan
  15.  * VERSION 1.0
  16.  * 
  17.  * Revision 3.4  91/08/13  06:51:20  brennan
  18.  * VERSION .9994
  19.  * 
  20.  * Revision 3.3  91/07/17  15:10:51  brennan
  21.  * moved space_split() proto to here
  22.  * 
  23.  * Revision 3.2  91/06/28  04:16:37  brennan
  24.  * VERSION 0.999
  25.  * 
  26.  * Revision 3.1  91/06/07  10:27:24  brennan
  27.  * VERSION 0.995
  28.  * 
  29.  * Revision 2.1  91/04/08  08:23:03  brennan
  30.  * VERSION 0.97
  31.  * 
  32. */
  33.  
  34. /* field.h */
  35.  
  36.  
  37. #ifndef  FIELD_H
  38. #define  FIELD_H   1
  39.  
  40. void  PROTO( set_field0, (char *, unsigned) ) ;
  41. void  PROTO( split_field0, (void) ) ;
  42. int   PROTO( space_split, (char *, unsigned) ) ;
  43. void  PROTO( field_assign, (int, CELL *) ) ;
  44. char *PROTO( is_string_split, (PTR , unsigned *) ) ;
  45.  
  46. #define   NF            (MAX_FIELD+1)
  47. #define   RS            (MAX_FIELD+2)
  48. #define   FS            (MAX_FIELD+3)
  49. #define   OFMT          (MAX_FIELD+4)
  50. #define   NUM_FIELDS    (MAX_FIELD+5)
  51.  
  52.  
  53. extern  CELL  field[NUM_FIELDS] ;
  54.  
  55. extern  int  nf ; /* shadows NF */
  56.  
  57. /* a shadow type for RS and FS */
  58. #define  SEP_SPACE      0
  59. #define  SEP_CHAR       1
  60. #define  SEP_STR        2
  61. #define  SEP_RE         3
  62.  
  63. typedef  struct {
  64. char  type ;
  65. char  c ;
  66. PTR ptr ; /* STRING* or RE machine* */
  67. } SEPARATOR ;
  68.  
  69. extern   SEPARATOR  rs_shadow  ;
  70. extern   CELL  fs_shadow ;
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77. #endif   /* FIELD_H  */
  78.